Skip to content

Upgrade to urfave/cli v3, spinners, build metadata - #21

Merged
javuto merged 1 commit into
developfrom
upgrade-cli-v3
Sep 12, 2026
Merged

javuto merged 1 commit into
developfrom
upgrade-cli-v3

Conversation

@javuto

@javuto javuto commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Upgrade to urfave/cli v3, spinners, build metadata

urfave/cli v2 → v3

Moves to github.com/urfave/cli/v3 v3.11.0, matching osctrl.

  • Flag env vars use v3's source API: EnvVars: []string{"X"} → Sources: cli.EnvVars("X"), across all 13 flags.
  • Root becomes a *cli.Command instead of *cli.App; Run takes a context.Context.
  • Action signatures move to func(context.Context, *cli.Command) error. The *cli.Context argument was unused in all seven action functions, so no bodies changed.
  • IntFlag is still int-backed in v3, so Configuration.Interval and every Destination pointer are untouched.

Spinners

New ui.go ports the braille spinner from osctrl's cmd/cli/shell_ui.go — no new direct dependency.

  • Writes to stderr, so piping enroll/remove script output to a shell stays clean.
  • Enabled only when stderr is a TTY, --verbose is off, and logFormat is not json. The service daemon never spins.
  • Wraps the four server-retrieval calls and the extension download loop.

Build metadata

Follows osctrl-cli: buildVersion / buildCommit / buildDate vars in main, --version/-v printing osctrld version=X commit=Y date=Z.

GoReleaser's four builds swap the dead -X main.version for the three -X main.build* flags, and the Makefile gains matching BUILD_ARGS.

@javuto javuto added the 📦 build Build pipeline related issues label Sep 12, 2026
@javuto
javuto merged commit 5983148 into develop Sep 12, 2026
2 checks passed
@javuto
javuto deleted the upgrade-cli-v3 branch September 12, 2026 07:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📦 build Build pipeline related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant